package com.google.gwt.sample.dynatablerf.client.widgets;

import com.google.gwt.cell.client.CheckboxCell;
import com.google.gwt.user.cellview.client.Column;
import com.google.gwt.view.client.SelectionModel;

public class GrifoCheckBoxColumn<T> extends Column<T, Boolean> {

	private SelectionModel<T> selectionModel;

	public GrifoCheckBoxColumn(SelectionModel<T> selectionModel) {
		super(new CheckboxCell());
		this.selectionModel = selectionModel;
	}

	@Override
	public Boolean getValue(T object) {
		return !selectionModel.isSelected(object);

	}

}